<?php require_once 'header.php';?>
    <body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
    	
    	<div class="main">
    		<h2><?=$lang['AdminUser'];?></h2>

<!-- menu -->
<?php require_once 'menu.php';?>
<!-- fin menu -->

    		<fieldset class="case1">
    		
    			<h3><?=$lang['AdminModUser'];?></h3>
    			
    			<div class="case-light" id="case1">
<?php if(isset($msg)):?>
					<?php displayError($msg)?>
<?php endif;?>
<?php if(isset($msgConf)):?>
					<div>
						<?=$msgConf;?>
					</div>
<?php endif;?>
<?php if(!isset($msg)):?>
					<form method="post" name="modcomp" id="modcomp" action="<?$_SERVER['PHP_SELF']?>">
						<p><?=$lang['AdminCompName'];?> : <input type="text" name="name" value="<?=$user['computer']?>"/></p>
						<p><?=$lang['AdminCompKey'];?> : <input type="text" name="ckey" value="<?=$user['key_comp']?>"/></p>
						<p><?=$lang['AdminUserEmail'];?> : <input type="text" name="email" value="<?=$user['mail_comp']?>"/></p>
						<p><input type="checkbox" name="notice" <?php echo ($user['receive_notice']==1)?"checked":""?>> : Recevoir un mail de notification de connexion ?</p>
						
								<input type="hidden" name="id_comp" value="<?=$_GET['id']?>"/>
						<p><input type="hidden" value="Valider" name="updatecomp"/>
						<div class="alone"><button type="button" name="valid" class="alone" onclick="modcomp.submit();"><?=$lang['formValidate'];?></button></div></p>
					</form>
<?php endif;?>
    		    </div>
    		    
    		</fieldset>
    		
    		
    		    		<fieldset class="case2">
    		
    			<h3><?php echo $lang['AdminCompCnx'];?> : </h3>
    			<div class="case-dark" id="case2">
    			<div style="text-align: left;">
    			<p>Pour ajouter la v&eacute;rification sur votre ordinateur : </p>
	    			<ul>
	    				<li>Sous mac et linux, ajouter la tache cron suivante toutes les cinq minutes, "wget <?php echo $_CONFIG['siteUrl'];?>data_spy.php?ckey=<?php echo $user['key_comp'];?>";</li>
	    				<li>Sous windows je ne sais pas pour le moment.</li>
	    			</ul>
    			</div>
				<div class="section">
					<?php $bg="section1";?>
					<?php if(!isset($msg0)):?>
						<?php while($hist = mysql_fetch_array($dataHistory)):?>
							<?php $bg=($bg=="section0")?"section1":"section0";?>
							<div class="<?php echo $bg;?>">
								<?php echo $hist['date']."&nbsp;";echo ($hist['mail_sended']=="1")?"&#64;":"";?>
								
								<div style="float: right;">
									<?php echo $hist['ip_address'];?>
									
								</div>	
							</div>
						<?php endwhile;?>
					<?php endif;?>

	
				
				</div>
				</div>
				</fieldset>
    		
    		
    		
    	</div>
    
    </body>
</html>